{ "cells": [ { "cell_type": "markdown", "id": "1eb7016d-c75e-44f9-929d-8e60bc0b3840", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "# Loading Spectrum Data" ] }, { "cell_type": "raw", "id": "95faed62-f403-4863-970c-b0ab14d8b471", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ ".. currentmodule:: massdash" ] }, { "cell_type": "raw", "id": "42dfd8ee-cbc2-4b0d-8867-394be19db190", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "Spectrum data loaders implement the same methods as Chromatogram Data Loaders as well as some additional methods since more information can be gathered from spectrum data loaders. Fetching raw data with spectrum loaders takes more time since data is extracted on the fly. Additionally :py:class:`~structs.TargetedDIAConfig` must be specified to instruct how the peptide should be extracted. " ] }, { "cell_type": "code", "execution_count": 1, "id": "2f7b4ad2-0486-4f1b-ba89-11e7dd381b0e", "metadata": { "editable": true, "nbsphinx": "hidden", "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "id": "f15a7806-3adb-41be-8d81-5e1eda910d71", "metadata": { "editable": true, "nbsphinx": "hidden", "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [], "source": [ "# Please run this before executing any cell\n", "import os\n", "os.chdir(\"../../test/test_data/\") #### Insert path to data, this is the path to the tutorial data. " ] }, { "cell_type": "markdown", "id": "7e070013-5f19-468e-a620-f04d18fbc421", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Initiating a Spectrum Data Loader" ] }, { "cell_type": "markdown", "id": "f97a362b-3752-4992-9bb4-230a2b4b7810", "metadata": { "editable": true, "raw_mimetype": "text/markdown", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "Most [Spectrum Loaders](../generated/massdash.loaders.GenericSpectrumLoader.rst) require the following inputs. " ] }, { "cell_type": "markdown", "id": "dfd2e13c-4307-4663-bbae-16a885016e73", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "\n", "1. **dataFiles** - a list of raw data files \n", "2. **rsltsFile** - a `.osw` or DIA-NN `.tsv` file containing the features\n", "3. **libraryFile** - a `.tsv`/`.osw`/`.pqp` file contaning the library (m/z and annotations of all transitions)" ] }, { "cell_type": "raw", "id": "1094bb7e-5ba5-4378-885e-9f0ae5e659ae", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "We can initiate a :py:class:`~loaders.MzMLDataLoader` object with follows. " ] }, { "cell_type": "code", "execution_count": 3, "id": "efbbf242-6cb5-4e67-a771-38d8d5357d9a", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Initializing valid scores for selection\n", "[2024-09-30 17:29:26,200] MzMLDataAccess - INFO - Opening mzml/ionMobilityTest.mzML file...: Elapsed 0.08319735527038574 ms\n", "[2024-09-30 17:29:26,201] MzMLDataAccess - INFO - There are 50 spectra and 0 chromatograms.\n", "[2024-09-30 17:29:26,202] MzMLDataAccess - INFO - There are 25 MS1 spectra and 25 MS2 spectra.\n" ] } ], "source": [ "from massdash.loaders import MzMLDataLoader\n", "loader = MzMLDataLoader(dataFiles=\"mzml/ionMobilityTest.mzML\",\n", " rsltsFile=[\"osw/ionMobilityTest.osw\", \"diann/ionMobilityTest-diannReport.tsv\"])" ] }, { "cell_type": "markdown", "id": "dde208d2-b025-427e-8061-4fafcfa7ec5f", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "
\n", "\n", "Note\n", "\n", "If only a DIA-NN file is provided, a library must also be provided. If no library file is provided, MassDash will assume the `.osw` file should also be used as the library. The library is required for determining the extraciton coordinates. \n", "\n", "
" ] }, { "cell_type": "raw", "id": "84f24441-dac1-4ade-87fd-840369bbb616", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "For the purpose of this tutorial we will be using the OpenSwath results this approach will work with any properly initiated :py:class:`~loaders.MzMLDataLoader`." ] }, { "cell_type": "markdown", "id": "e04297c9-77b9-4e08-86f1-217a9b5f21c4", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "
\n", "\n", "Note\n", "\n", "If a `.osw` file is provided as a rslts file and no library file is provided, MassDash will assume the `.osw` file should also be used as the library. \n", "\n", "
" ] }, { "cell_type": "markdown", "id": "a2d65655-b46f-4b6c-9338-5f351541cf58", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Loading a Transition Group" ] }, { "cell_type": "raw", "id": "fa5cdda7-0d26-4b49-9ac0-65d7ed7eb6ba", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "To fetch the chromatograms for a particular transitionGroup, we can call the :py:func:`~structs.GenericSpectrumLoader.loadTransitionGroups` method. In addition to the modified peptide sequence and charge state, this method also requires a :py:class:`~structs.TargetedDIAConfig` which specifies the extraction parameters and will load the transition groups across all runs. This method can take a while since it is fetching the data across all experiments from disk. " ] }, { "cell_type": "markdown", "id": "9b9713c1-7000-4167-871d-5ea478221889", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "In this example we will visualize the peptide *NKESPT(UniMod:21)KAIVR(UniMod:267)* with a charge state of *3*" ] }, { "cell_type": "raw", "id": "a23a6d2c-33b3-4015-801e-eb7fe1353512", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "First, we can create a :py:class:`~structs.TargetedDIAConfig`." ] }, { "cell_type": "code", "execution_count": 4, "id": "e647514a-0a3f-4055-bee0-d794b05c51c3", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [], "source": [ "from massdash.structs.TargetedDIAConfig import TargetedDIAConfig\n", "extraction_config = TargetedDIAConfig()\n", "extraction_config.im_window = 0.2\n", "extraction_config.rt_window = 50\n", "extraction_config.mz_tol = 20" ] }, { "cell_type": "raw", "id": "ea889aac-45d7-472a-b3fe-8c042c8c6965", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "Then we can invoke the :py:func:`~structs.MzMLDataLoader.loadTransitionGroups` method with the target sequence, charge and extraction config. Note: the extraction will always occur " ] }, { "cell_type": "code", "execution_count": 5, "id": "49942906-4dc2-4d7a-8a70-812ab233fcd4", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "TransitionGroupCollection\n", "ionMobilityTest: -------- TransitionGroup --------\n", "precursor data: 1\n", "transition data: 6\n", "data type: Chromatogram" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "transitionGroup = loader.loadTransitionGroups(\"AFVDFLSDEIK\", 2, extraction_config)\n", "transitionGroup" ] }, { "cell_type": "code", "execution_count": 6, "id": "c08d60c7-3493-49cd-8de8-24dbda12e043", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "massdash.structs.TransitionGroupCollection.TransitionGroupCollection" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(transitionGroup)" ] }, { "cell_type": "raw", "id": "6eba544d-4d20-456e-a0d0-fe2eac478903", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "Like the ChromatogramLoaders, a :py:class`~structs.TransitionGroupCollection` is loaded which is a dictionary is returned where the file keys are the the runname and the values are a :py:class:`~structs.TransitionGroup`. The :py:class:`~structs.TransitionGroup` holds a series of chromatograms belonging to the same precursor. This :py:class:`~structs.TransitionGroup` object can be used for plotting." ] }, { "cell_type": "markdown", "id": "1861d1fe-915d-434a-bade-2d3139e6ab3d", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "### Loading Chromatogram Data as a Pandas DataFrame" ] }, { "cell_type": "raw", "id": "ec921337-8ed3-4550-becd-2ac734d1c048", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "Like `Chromatogram Data Loaders`_, data can be loaded into a pandas dataframe using the :py:func:`~loaders.MzMLDataLoader.loadTransitionGroupsDf`.\n", "\n", ".. _Chromatogram Data Loaders: Loading\\ Chromatogram\\ Data.ipynb#Loading-Chromatogram-Data-as-a-Pandas-DataFrame" ] }, { "cell_type": "code", "execution_count": 7, "id": "564969ca-c692-4f10-bbb2-87098a74c414", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
runAnnotationrtint
0ionMobilityTestprec6225.005106229.011734
1ionMobilityTestprec6226.79295026.001631
2ionMobilityTestprec6228.58093257.999416
3ionMobilityTestprec6230.367189826.008179
4ionMobilityTestprec6232.1564361589.015259
...............
163ionMobilityTesty9^16259.2927554355.988281
164ionMobilityTesty9^16261.1014061168.029907
165ionMobilityTesty9^16262.9090951286.014038
166ionMobilityTesty9^16264.711573413.995209
167ionMobilityTesty9^16266.5151361217.012207
\n", "

168 rows × 4 columns

\n", "
" ], "text/plain": [ " run Annotation rt int\n", "0 ionMobilityTest prec 6225.005106 229.011734\n", "1 ionMobilityTest prec 6226.792950 26.001631\n", "2 ionMobilityTest prec 6228.580932 57.999416\n", "3 ionMobilityTest prec 6230.367189 826.008179\n", "4 ionMobilityTest prec 6232.156436 1589.015259\n", ".. ... ... ... ...\n", "163 ionMobilityTest y9^1 6259.292755 4355.988281\n", "164 ionMobilityTest y9^1 6261.101406 1168.029907\n", "165 ionMobilityTest y9^1 6262.909095 1286.014038\n", "166 ionMobilityTest y9^1 6264.711573 413.995209\n", "167 ionMobilityTest y9^1 6266.515136 1217.012207\n", "\n", "[168 rows x 4 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "transitionGroupDf = loader.loadTransitionGroupsDf(\"AFVDFLSDEIK\", 2, extraction_config )\n", "transitionGroupDf" ] }, { "cell_type": "markdown", "id": "a3df005c-6b4f-49e9-9cdc-593c77c5a1b0", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "This dataframe has all of the intensities and retention times for all of the files across all transitions. Transitions can be diffrentiated by the *annotation* column and the *run* column diffrentiates the run in which the chromatograms originate from. If ion mobility was present in the original file, intensities are summed across all values of ion mobility." ] }, { "cell_type": "markdown", "id": "3a03eab8-0607-45f6-b46a-be3f470b7110", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "
\n", "\n", "Note\n", "\n", "If a pandas dataframe is required it is recomended to use the `FeatureMap` object directly as described below. \n", "\n", "
" ] }, { "cell_type": "markdown", "id": "1822082b-f449-4f8f-b4df-4ac48ac35037", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "## Loading a Feature Map" ] }, { "cell_type": "raw", "id": "8c467799-e720-4824-95b7-58da5be771ea", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "The primary datatype that is fetched from a :py:class:`~structs.FeatureMap` which is contains a pandas dataframe of the extracted chromatogram across all precursors and transitions. Thus, under the hood, the :py:func:`~loaders.GenericSpectrumLoader.loadTransitionGroups` method is fetching a :py:class:`~structs.TransitionGroup` and converting it into a :py:class:`~structs.FeatureMap`. Due to this conversion step, if a pandas dataframe is required, it is generally faster to work with the :py:class:`~structs.FeatureMap` directly. " ] }, { "cell_type": "raw", "id": "93ed758c-a7af-4fff-b5b5-92bfdd3dc18c", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "The FeatureMap object can be loaded using the :py:func:`~loaders.GenericSpectrumLoader.loadFeatureMaps` method as demonstrated below. " ] }, { "cell_type": "code", "execution_count": 8, "id": "74e8d17b-603b-4e0d-ac02-f2ad5b37309b", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n" ] }, { "data": { "text/plain": [ "{'ionMobilityTest': }" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "featureMap = loader.loadFeatureMaps(\"AFVDFLSDEIK\", 2, extraction_config)\n", "print(type(featureMap))\n", "featureMap" ] }, { "cell_type": "raw", "id": "d50835f2-7f03-4954-95b0-3158eb8ec4e8", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "Simmilar to the :py:func:`~loaders.GenericSpectrumLoader.loadTransitionGroup` method this method returns a :py:class`~structs.FeatureMapCollection` where the keys are the runnames and the values are the corresponding :py:class`~structs.FeatureMap`" ] }, { "attachments": {}, "cell_type": "raw", "id": "957806d6-49ce-4863-b6fb-cb97162fec18", "metadata": { "editable": true, "raw_mimetype": "text/restructuredtext", "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "The :py:class:`~structs.FeatureMap` object has two important properties:\n", "\n", "1. `.feature_df` property which returns the dataframe\n", "2. `.config` property which returns the :py:class:`~structs.TargetedDIAExtraction` that was used to generate this :py:class:`~structs.FeatureMap`" ] }, { "cell_type": "code", "execution_count": 9, "id": "16eb9f10-f1c8-4910-8e93-a197e005e6cf", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
native_idms_levelprecursor_mzmzrtimintAnnotationproduct_mz
01642.3295642.3341876225.0051060.90025476.000458prec642.3295
11642.3295642.3341876225.0051060.969271153.011276prec642.3295
22642.3295504.2620116225.1108170.93528168.001518y4^1504.2664
32642.3295504.2620116225.1108171.02590241.000328y4^1504.2664
42642.3295504.2620116225.1108170.92600143.000782y4^1504.2664
..............................
68122642.32951065.5461186266.5151360.9754418.999968y9^11065.5463
68132642.32951065.5512246266.5151360.98677733.001766y9^11065.5463
68142642.32951065.5512246266.5151360.92394584.003464y9^11065.5463
68152642.32951065.5563316266.5151360.91054663.997871y9^11065.5463
68162642.32951065.5563316266.5151360.92189154.000694y9^11065.5463
\n", "

6817 rows × 9 columns

\n", "
" ], "text/plain": [ " native_id ms_level precursor_mz mz rt im \\\n", "0 1 642.3295 642.334187 6225.005106 0.900254 \n", "1 1 642.3295 642.334187 6225.005106 0.969271 \n", "2 2 642.3295 504.262011 6225.110817 0.935281 \n", "3 2 642.3295 504.262011 6225.110817 1.025902 \n", "4 2 642.3295 504.262011 6225.110817 0.926001 \n", "... ... ... ... ... ... ... \n", "6812 2 642.3295 1065.546118 6266.515136 0.975441 \n", "6813 2 642.3295 1065.551224 6266.515136 0.986777 \n", "6814 2 642.3295 1065.551224 6266.515136 0.923945 \n", "6815 2 642.3295 1065.556331 6266.515136 0.910546 \n", "6816 2 642.3295 1065.556331 6266.515136 0.921891 \n", "\n", " int Annotation product_mz \n", "0 76.000458 prec 642.3295 \n", "1 153.011276 prec 642.3295 \n", "2 68.001518 y4^1 504.2664 \n", "3 41.000328 y4^1 504.2664 \n", "4 43.000782 y4^1 504.2664 \n", "... ... ... ... \n", "6812 8.999968 y9^1 1065.5463 \n", "6813 33.001766 y9^1 1065.5463 \n", "6814 84.003464 y9^1 1065.5463 \n", "6815 63.997871 y9^1 1065.5463 \n", "6816 54.000694 y9^1 1065.5463 \n", "\n", "[6817 rows x 9 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "featureMap['ionMobilityTest'].feature_df" ] }, { "cell_type": "code", "execution_count": 10, "id": "ff3e0ad6-3924-49e3-a17b-0d4460223c61", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "featureMap['ionMobilityTest'].config" ] }, { "cell_type": "markdown", "id": "2c5b0cb8-81c3-4134-8b98-9d886f40dbbe", "metadata": {}, "source": [ "## Converting a FeatureMap to 1D data" ] }, { "cell_type": "raw", "id": "83faec26-9b6b-4fe6-b624-30509c3880d2", "metadata": {}, "source": [ "A :py:class:`~structs.FeatureMap` be difficult to work with due to its high dimensionality. Thus, massDash has built in methods to convert a :py:class:`~structs.FeatureMap` into a :py:class:`~structs.Chromatogram` (retention time vs intensity), :py:class:`~structs.Spectrum` (m/z vs intensity) or, if ion mobility is present a :py:class:`~structs.Mobilogram` (intensity vs ion mobility)" ] }, { "cell_type": "raw", "id": "1b903254-126d-4d33-99e5-7435853394ee", "metadata": {}, "source": [ "To accomplish this we can use the :py:func:`~structs.FeatureMap.to_chromatogram`, :py:func:`~structs.FeatureMap.to_spectra`, :py:func:`~structs.FeatureMap.to_mobilograms` methods respectively" ] }, { "cell_type": "code", "execution_count": 11, "id": "c985108c-3a95-4475-bd39-32f4f0f38119", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "chromatograms = featureMap['ionMobilityTest'].to_chromatograms()\n", "chromatograms" ] }, { "cell_type": "code", "execution_count": 12, "id": "eddc00a5-ef6a-4c01-87f3-4553ad280d4a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "spectra = featureMap['ionMobilityTest'].to_spectra()\n", "spectra" ] }, { "cell_type": "code", "execution_count": 13, "id": "766bcae8-96b7-4f8e-940e-e12a83ac0d73", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mobilograms = featureMap['ionMobilityTest'].to_mobilograms()\n", "mobilograms" ] }, { "cell_type": "markdown", "id": "fa035d11-bc1d-48b1-876d-548e9a2ccaee", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "source": [ "
\n", "\n", "Note\n", "\n", "When converting a `FeatureMap` a `TransitionGroup` is always returned however the underlying data type is different based on the conversion method used. \n", "\n", "
" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.18" } }, "nbformat": 4, "nbformat_minor": 5 }